import frame.ApplicationContext;
import mvc.TomcatServer;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        ApplicationContext ioc = new ApplicationContext("test");
        Object cat = ioc.getBean("Cat");
        System.out.println(cat);
        ioc.initContext("mvc");
//        ApplicationContext ioc2 = new ApplicationContext("mvc");
        Object tomcatServer = ioc.getBean("TomcatServer");
        try {
            ((TomcatServer) tomcatServer).start();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
